var guding = document.getElementById('guding')
guding.onmouseover = function () {
    guding.style.backgroundPosition = '-56px -46px'
}
guding.onmouseout = function () {
    guding.style.backgroundPosition = '0 -46px'
}







var ma = document.getElementById('yanzhengm');

var huan = document.getElementById('huan');

huan.onclick = function () {
    var arr ='';
    for (let i = 0; i < 4; i++) {
        arr += random(0, 9)
    }
    ma.innerHTML = arr;
}
huan.onclick()
function random(a, b) {
    return Math.ceil(Math.random()*(b-a+1)+a-1);   
}


var submit = document.getElementById('submit');
var erryanzheng = document.getElementById('erryanzheng');
var yanz = document.getElementById('yanz');
erryanzheng.style.display = 'none'

yanz.onblur = function () {
    if (yanz.value !== ma.innerHTML) {
        erryanzheng.style.display = 'block'
        return
    }
    erryanzheng.style.display = 'none'
}

// submit.onclick = function () {
//     if (yanz.value !== ma.innerHTML) {
//         erryanzheng.style.display = 'block'
//         return
//     }
//     erryanzheng.style.display = 'none'

// }
